A Mac Plus or better is recommended to use this program. You should have enough RAM to be able to allocate about one megabyte to TextMangler, although it will run with less. For example, mangling this Read Me file only uses a total of about 250K of RAM.
TextMangler will read in the text file you select and produce a "mangled" version of it. The algorithm it uses is conceptually simple: the original text is analyzed statistically to produce a table (Markov table) containing all two-word pairs and the percent occurrence of each single word following each pair in the text. Then a "mangled" sequence (Markov chain) is generated by starting with a word pair and choosing a third word based on the probability of that third word following the pair in the original text. Then the second word of the starting pair and the chosen third word become the next word pair, and text is built up by repeating this process until the end is reached.
If the original text file is big enough the resulting Markov chain is a wild transposition of text that contains readable material but is full of non sequiturs. The output can be hilarious. Once the table is built you can run the mangling process several times and save the best results.
The input text should be at least two or three pages in length. It's good if the text covers more than one subject area, so that the mangling process can interweave the topics. This can be done easily by opening several files in sequence, adding each table generated to the old one. The total size of the table you can build depends on the amount of RAM you have. If you run out of memory, try increasing the memory allocated to TextMangler by choosing 'Get Info...' in the Finder when the TextMangler icon is highlighted and changing the number at the bottom of the Get Info box to a higher one. Allocating one or two megabytes is enough for a good-sized table. Of course, you must quit TextMangler to change the memory allocation. Quitting destroys the Markov table and at present there is no way to save it. Later versions may have this capability.
Detailed Mangling Instructions:
First select a text file to mangle. A text file is one saved as "Text Only" by a word processor. (Some word processors, like TeachText, will only produce text files.) When TextMangler is first opened, clicking the "Do It" button or pressing the Return key will allow you to select a text file and generate a Markov table. To build up a large table from several text files, select the 'Add to Table' button and then Do It. In general the larger the table the more interesting the results.
When the table is built, click on the 'Mangle!' button and then the 'Do It' button to start mangling. You can adjust the maximum length of the output by using the 'Text Length' command in the Options menu.
Saving the output creates a TeachText® file (TeachText is a registered trademark of Apple Computer, Inc.) which can be opened in any word processor.
For more help, select the 'About...' item under the apple menu in the TextMangler application.
Character Frequencies:
You can use TextMangler to produce a table of character frequencies for any data file. This has nothing to do with the mangling process; I just thought it would be fun to do. Also, it is useful if you need to solve simple substitution ciphers. Unfortunately, those ciphers went out of fashion centuries ago.
Options:
The Option menu allows you to do various things, like open non-text files or chose a specific word pair to start mangling from. More information is contained in TextMangler's "About..." box.
Key Equivalents:
There are a number of key equivalents for mouse clicks in TextMangler. For example, you can use the up and down arrow keys to select the radio buttons in the main dialog, while the right and left arrow keys select the text window and main dialog window, respectively.
References:
The June 1989 and January 1990 Scientific American "Computer Recreations" columns and the January-March 1992 issue of Algorithm (volume three, number one) have additional information about the algorithm TextMangler uses. This type of algorithm was used in a program called "Mark V. Chaney" (a pun on "Markov chaining") to take messages posted on a "singles" section of a computer bulletin board and mangle them to produce a side-splitting hodgepodge. The mangled text was then re-uploaded as a message from Mark V. Chaney. Some people were amused; some people were upset. If I were you I'd check with the bulletin board owners before using this program in that way.
Caution:
Don't expect TextMangler to produce incredibly humorous output from just any input file. Also, you may have to mangle several times before you get optimally funny results. Sometimes the mangling process gets into a "loop" and repeats itself; this can happen with any length file. Finally, I cannot be held responsible for injuries suffered as a result of anyone falling out of their chair because of laughing too hard at TextMangler's output.
Plea for Money:
TextMangler™ is distributed as shareware. Try it out, and if you like it and keep it, send in your $10.00 (the address is in TextMangler's "About..." box). I'll keep you informed about updates and other interesting programs.
Gratuitous Addenda:
Since this is a text file, I have a suspicion that someone will try mangling it. I don't mind. In fact, here are three tidbits to make it more interesting. The first is an excerpt from Douglas Adam's new book "Last Chance to See...". Douglas Adams is also the author of "The Hitchhiker's Guide to the Galaxy". The second is an excerpt from the 'singles' section of a national bulletin board, and the last one is from the introduction of a college chemistry text.
"Last Chance," written with zoologist Mark
Carwardine, is a look at six near-extinct species of
animals and the people trying to save them.
On Komodo dragons, for example:
"...When a dragon attacks a horse or a
buffalo, it doesn't necessarily expect to kill it
there and then. If it gets involved in a fight it
might get injured, and there's no benefit in that,
so sometimes the dragon will just bite it and walk
away. But the bacteria that live in a dragon's
saliva are so virulent that the wounds will not
heal and the animal will usually die in a few days
of septicemia, whereupon the dragon can eat it at
leisure. Or another dragon can eat it if it
happens to find it first.... It's good for the
species that there is a regular supply of badly
injured and dying animals about the place.
"There was a well-known case of a Frenchman
who was bitten by a dragon and eventually died in
Paris two years later. The wound festered and
would just never heal. Unfortunately there were no
dragons in Paris to take advantage of it so the
strategy broke down on that occasion, but
generally it works well."
I've been thinking further about your comments
regarding what you see in the ads from women
who want the "successful yuppie" type. I suspect,
although I can't be certain, that this may be
coming from women who have never been married.
A number of women I know who are over 30 and
never been married seem to be waiting for their
vision of a "prince" to carry them off into the
sunset. What they don't realize is that there are a
LOT of princes out there, and they don't all wear
3-piece suits. I was married to one of the "yuppie
princes" and the "yuppie" part did nothing to
enhance our relationship. So, I guess what I'm
saying is -- if they truly are holding out for this
image of perfection they seem to have, they're
probably going to wait a long time. It's their
loss, really. That's kind of how I feel about the
guys who are only interested in the young babes.
Yeah, they say you have to kiss a lot of frogs
before you find your prince... But sometimes you
kiss a prince(ss) and end up with a frog...
Look around you. That's how chemistry began — in the limitless curiosity of
human beings about their surroundings. Possibly you are sitting at your desk
with some paper and a wooden pencil or a plastic pen at hand to take notes.
Maybe there are some metal paper clips and a pottery coffee cup or a glass
soft-drink bottle or an aluminum can on your desk. What could you do to
investigate the materials in your paper, your pencil or pen, the paper clips,
the cup, the bottle, or the can? Scratch them. Which is harder? Put a drop of
water, or alcohol, or acid on each one. What happens? Weigh pieces of equal
size. Which is heavier? Try to burn a small piece of each. Which ones burn?
What is left afterwards? You could work your way around your room cataloging
how everything in it responds to these and other tests. You could go outside
and do the same for the rocks and plants. Pretty soon you would be able to draw
conclusions about which things are similar to each other and which differ from
each other. If you have a curious nature, your next questions should begin with
"Why...?" and "How...?" Why does wood burn, but pottery not? How can I predict
whether other things will or won't burn? Why are some things heavier or harder
than others? Why don't these things dissolve in water? How does acid change a
paper clip? Chemistry has its roots in just this kind of speculation about the
nature of simple things. In early times, people wondered about air, and water,
and rocks, and fire, and looked for magical and mystical answers to questions
about the physical world around them. Once the importance of systematic
observation was recognized, the foundation was laid for chemistry and all the